﻿#region Using namespaces

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;

using BOL.Apps.GeneNetworkBrowser.Analysis;

#endregion

namespace BOL.Apps.GeneNetworkBrowser.ViewModels
{
    public sealed class ResultsTreeViewItemViewModel : TreeViewItemViewModel
    {
        #region TreeViewItemViewModel implementation

        private ObservableCollection<IResult> _results;

        public ResultsTreeViewItemViewModel(ObservableCollection<IResult> results, ProjectTreeViewItemViewModel vmProject)
            : base(vmProject, true)
        {
            _results = results;
        }

        protected override void LoadChildren()
        {
            foreach (var result in _results)
                base.Children.Add(new ResultTreeViewItemViewModel(result, this));
        }

        #endregion
    }
}
